home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SPACE 1
/
SPACE - Library 1 - Volume 1.iso
/
program
/
114
/
ezscreen
/
print_me.doc
< prev
next >
Wrap
Text File
|
1987-10-10
|
15KB
|
331 lines
EZ_SCREEN is SHAREWARE - 1 -
EZ SCREEN FORMATTER
The EZ SCREEN FORMATTER is a code generating program. This
means that you use it to actually write GFA BASIC program code for
simple input/output. You use the program to design an input
screen of 80 columns by 24 lines, using the function keys to
designate how the program is to interpret your input.
You create 'masks' of letter only, numeric only or character
(both numeric and letters), forcing the program you will create to
screen your input. The code that is generated can be either an
entire GFA BASIC program or just a procedure to merge into another
program. These programs and procedures are written out to disk in
ASCII form.
You will have to MERGE it using the GFA interpreter, but
these programs and procedures will only be a shell for you to
start building your own application from. Please read these
instructions so that you can learn to fully utilize this code into
your own programs.
You the programmer create a mask or masks of inverse
characters that denote the length of the field for input, and
allow you to denote which type of character input is to be
allowed. Furthermore, at the same time, you also place text
prompts onto the screen to guide your user.
Also, the program allows your user to jump around the screen
filling in whatever blank he would like next, until such time as
he signals he is finished inputting data by pressing the UNDO key.
The EZ SCREEN FORMATTER will generate an ASCII file that can be
merged into the GFA BASIC INTERPRETER, and then RUN to test the
design of your input screen.
The program will display a file selector box, and you will be
prompted for an INPUT FILE name. If you do not yet have a data
file, or whenever you are creating a new program, select the
CANCEL button, this will provide you with a blank screen to edit.
If you have an existing .SCR file, select it.
If you try to select a file that does NOT have a .SCR
extension, the program will add the .SCR extension anyway and then
try to find it. After a couple of seconds, the program will
display your previously defined screen (if you selected one, or a
blank screen if you selected CANCEL) and then display five prompts
at the bottom of the screen.
One of the first four prompts will be displayed in inverse
text at any point in time to let you know what mode you are in.
These modes are:
ALPHA-Letters A-Z,a-z, 0-9, - or .
CHARacter-Letters A-Z,a-z, - or .
NUMeric-numbers 0-9 or - or .
TEXT-any printable ascii except ,
copyright 1987 David Stambaugh 2239 Hawthorne Washington IL 61571
EZ_SCREEN is SHAREWARE - 2 -
The last prompt is actually a reminder that when you are
finished designing your screen, that you should press CONTROL-C
when you wish to continue on.
Note that you have all but the last row of the screen to use
to design your input screen. This row of the screen will be used
for prompting you as you use this program, and later for prompting
your user in the program that you will create. When the TEXT
mode is selected, anything you type (printable ASCII characters
that is) will be displayed on the screen in normal mode. The
F6 key inserts a blank line where ever the cursor happens to be
located and move all lines below it down one line. The data on the
last line is lost if there is any. The F7 key DELETES the line
the cursor is currently resting on and moves all following lines
up one position.
The F8 key INSERTS A SPACE at the current cursor location and
moves all information on the same line after that position to the
right one space. Any character in the 80th column is lost. The
F9 key DELETES a space at the current cursor location and moves
all following characters on the same line to the left one
position.
In case you forget which function key does what, the first
four function key definitions are displayed continually by
default, and the definitions of F6 through F9 can be displayed by
pressing the HELP key. You must press any other key to continue
on after displaying these four definitions and the program will
revert to TEXT mode after this display.
If you select any of the three INPUT modes (CHARACTER,
NUMERIC or ALPHANUMERIC), then when you type, you will see the
letters C, N or A appear on the screen in INVERSE mode. This is
the MASK that you are creating for user input. Anything that you
type while in this mode is actually a blank space for your user to
type into when the program is generated.
Please note that while you are in NUMERIC mode, you must
press NUMERIC keys to get anything to appear on the screen. The
same thing holds true for CHARACTER mode. The ALPHANUMERIC mode
will allow almost anything except a comma to be pressed.
Also note that if you run together two different types of
input for example NUMERIC immediately followed by CHARACTER, the
program catches this and treats this as two distinct input fields.
Now that you know what you are doing, go ahead and try your hand
at designing a screen.
When you are finished, press the CONTROL key and the C key at
the same time. Another File Selector box will be displayed. This
time it is important that you save the screen that you have
designed! Once again, the program will force the .SCR extension
even if you name the file something else.
Furthermore, all further files created past this point will
use the same base file name (the same character to the left of the
period in the final file name extension). If you skip saving
this screen, then you will not be able to modify the file that you
copyright 1987 David Stambaugh 2239 Hawthorne Washington IL 61571
EZ_SCREEN is SHAREWARE - 3 -
have just created.
The program is set up so that you can modify an existing file
if you decide at a later time that you wish to modify it. You do
not need this file to create a running program, but if you find
that you have made a mistake and have not saved this .SCR file,
then you will have to start over when you try to fix your mistake.
Choose an appropriate file name and save the file.
After the file has been saved, the screen will once again
clear and the upper twelve lines of your input screen will be
displayed. One by one, you will be asked to supply variable names
for the variables that are to contain the user input for each
mask. You will also be shown some information about the field
such as X and Y locations on the screen and field length.
Do not use GFA BASIC variable names as this will cause your
program not to run. The variables are all of STRING type so you
must not try to type the variables by using the $ or % since the
program does this for you.
After you supply the variable name, the program will ask you
for a HELP message to guide the program user in deciding how to
supply the data or what to supply. Whatever you type here will be
shown on the last line of the screen (the 25th line that you could
not use when defining the screen) in inverse type whenever the
cursor is in this particular field.
You are limited to 65 characters on this help field). After you
supply the HELP string, the program switches the question marks
into asterisks to denote that you have finished with that field.
When you have finished with the first twelve lines of your screen,
the program then redisplays the next twelve lines and goes through
the same procedure as for the first twelve lines.
When you finish answering questions for both screen halves,
the program will display the variable names, some pertinent data
such as field type and length and then ask you if this is what you
wanted. If you respond with anything other than Y or y, then the
program will return you to the screen design portion of the
program with the screen displayed as you currently have it in
memory.
If you want to quit without generating a new program, simply
depress the CONTROL SHIFT ALTERNATE key sequence that terminates
GFA BASIC programs. If you respond Y or y then the program will
save the variables and the HELP line text to a file with the same
base file name as your screen file but with a .VAR extension.
Next you will be prompted to press the letter P if you want
the program to print out a list of all of the variables and their
lengths that you have defined in the previous portion of the
program. Pressing any other key will skip the variable printout.
The next prompt is for you to press the same SINGLE keypress
combination that you would like your user to enter when he
finishes inputting data.
This can be any of the function keys, the HELP key, the HOME
copyright 1987 David Stambaugh 2239 Hawthorne Washington IL 61571
EZ_SCREEN is SHAREWARE - 4 -
key or ANY keypress combination that you want. Note that this is
the ONLY way to signify that the user is finished with the
program. If you create a main program module and then add some
different procedures to show different screens all made by
EZ_SCREEN, you can have different terminators in each screen.
Now the program will ask if you wish to create an entire
PROGRAM or just the unique SUBROUTINES needed to merge into a
program created by EZ_SCREEN. A little explanation is in order
here. Some of the procedures used in a program created by
EZ_SCREEN have no changes made to them regardless of the screen
that was defined.
If you define two programs with EZ_SCREEN and then merge
them, you will have several duplicate procedures in your merged
program. EZ_SCREEN allows you to avoid this by only creating
these procedures ONCE, in the PROGRAM option. If you then merge a
PROCEDURE generated by EZ_SCREEN, it will not contain the
duplicate procedures.
If you have more questions on this, create a program with
EZ_SCREEN and list it to the printer. Then using the same .SCR
file, create a PROCEDURE and then list it to the printer. If you
compare the listings you will see what procedures are not created
in a PROCEDURE. To choose which you are creating, press P for a
program or S for a subroutine.
Now for the most complex concept in using EZ_SCREEN. If you
want to create three or four screens to use all in the same
program, then EZ_SCREEN has to make unique names for all of the
procedures that it uses. These procedures are only slightly
different from screen to screen but they must have a unique names.
The way that EZ_SCREEN accomplishes this is to ask you to
input an EXTENSION that it adds on to the procedure name. As an
example, each of the PROCEDURES start life with a name of EZ. If
you input an extension of Accounts, then the procedure would be
renamed Ez_accounts. (You do not have to input the underscore
character after the Ez_screen, the program does that for you.)
Once you have answered the extension question, lean back and
watch your drive busy light (unless you are running this from a
ram disk). It really doesn't take very long for the program to
finish writing out your new code. The program will then generate
an entire BASIC program listing for you in the directory from
which you ran the EZ-SCREEN program called ????????.LST.
The ???????? denotes the base file name you input when you
saved your screen (.SCR) file. The program will tell you when it
has finished generating this listing. Now all you have to do is
enter the GFA editor, make sure that the editor is empty (do a
NEW) and then MERGE the ????????.LST file that was just created.
If you generated a program, hit SHIFT-F10 and run it to test it
out.
Even if you only want a PROCEDURE, it is a good idea to
create a PROGRAM first, test using the input screen and then go
back and create the PROCEDURE.
copyright 1987 David Stambaugh 2239 Hawthorne Washington IL 61571
EZ_SCREEN is SHAREWARE - 5 -
Note that this program will only be a shell from which you
build the remainder of your application!
The code is not very useful as it is generated by the EZ-
SCREEN program, but is set up so that is would be easy to add
modules to turn it into a fairly professional looking application
program.
EZ_SCREEN is NOT PUBLIC DOMAIN SOFTWARE, it is SHAREWARE.
Please respect the author's right to make a buck.
This program is SHAREWARE. Use it free of charge to decide
if you think it is worth paying to use. If you wish to distribute
programs written wholly or in part by EZ_SCREEN, you should
register with the author of EZ_SCREEN by filling out the
registration form (REGISTER.DOC) and sending it and $5.00 to the
author at the following address:
Dave Stambaugh
2239 Hawthorne Place
Washington, IL 61571
copyright 1987 David Stambaugh 2239 Hawthorne Washington IL 61571